home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: loading a new process using exec()
- Date: Sun, 24 Mar 96 21:09:35 GMT
- Organization: none
- Message-ID: <827701775snz@genesis.demon.co.uk>
- References: <0lJDsb200iol07bUU0@andrew.cmu.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <0lJDsb200iol07bUU0@andrew.cmu.edu>
- elie+@andrew.cmu.edu "Elie Jean-Philippe" writes:
-
- >Hi all,
- >
- >I'm trying to load a program in a new process created using fork().
- >I'm using the following code (under HP-UX, 9.0):
- >
- >char *cmd_args[] = {"test",NULL};
- >if (execl(cmd_args[0],cmd_args) < 0) {
-
- fork() and execl() are Unix system functions, not C language function so have
- no meaning in comp.lang.c. You should discuss them in comp.unix.programmer.
-
- On the systems I use execl is prototyped as:
-
- int execl(const char *path, const char *arg, ...);
-
- which your call clearly does not conform to. man execl, man execv.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-